import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.sptus.AppApplication;
import com.sptus.entity.SptUserRole;
import com.sptus.service.ISptUserRoleService;
import com.sptus.service.impl.SptUserRoleServiceImpl;
import org.apache.xmlbeans.impl.xb.xsdschema.Public;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@SpringBootTest(classes = AppApplication.class)

public class MybatisTEST {
    @Resource
    SptUserRoleServiceImpl sptUserRoleService;
    @Test
    public void  getMybatis(){
        LambdaQueryWrapper<SptUserRole> sptUserRoleQueryWrapper = new LambdaQueryWrapper<>();
        sptUserRoleQueryWrapper.eq(SptUserRole::getId,"1");
        Map<String, Object> map = sptUserRoleService.getMap(sptUserRoleQueryWrapper);
        System.out.println(  map);

    }
}
